//
//  MainViewController.m
//  WhatToEat
//
//  Created by Mac on 15/3/18.
//  Copyright (c) 2015年 Mac. All rights reserved.
//

#import "MainViewController.h"
#import "EAWeatherForIP.h"



@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self updateUI];
    


    

// NSDictionary *d = [[EAWeatherForIP sharedEAWeatherForIP] getWeatherForIP];
//    
//    NSString *s=d[@"temp1"];
//    NSString * s1=[s stringByReplacingOccurrencesOfString:@"℃" withString:@""];
//    
//    self.temperatureLabel.text=[NSString stringWithFormat:@"%@℃",s1];
//    
//    
//    
//    self.weatherLabel.text=d[@"weather"];
//    self.cityLabel.text=d[@"city"];
//    
    
    
}




-(void)updateUI
{

   self.navigationItem.title=@"吃神马";

    
    UIBarButtonItem *bt=[[UIBarButtonItem alloc] init];
    bt.title=@"返回";
    self.navigationItem.backBarButtonItem=bt;
    

    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"head"] style:UIBarButtonItemStyleDone target:self action:@selector(toLeft:)];
    self.navigationController.navigationBar.barStyle = UIStatusBarStyleDefault;
    [self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];
    self.nextBtn.layer.cornerRadius=kRadius;
    self.nextBtn.clipsToBounds=YES;
}

- (IBAction)toLefts:(id)sender {
    
    [ApplicationDelegate.ddVc showLeftController:YES];
}

- (void)toLeft:(UIButton *)sender
{

    [ApplicationDelegate.ddVc showLeftController:YES];
}

- (IBAction)nextAction:(UIButton *)sender
{
    EAChooseMatch *cVC=[self.storyboard instantiateViewControllerWithIdentifier:@"EAChooseMatch"];
    

    [self.navigationController pushViewController:cVC animated:YES];
}
@end
